Skip to content

Compute block_counts iteratively with explicit stack#13

Open
maffoo wants to merge 2 commits into
baverman:masterfrom
maffoo:count-stack
Open

Compute block_counts iteratively with explicit stack#13
maffoo wants to merge 2 commits into
baverman:masterfrom
maffoo:count-stack

Conversation

@maffoo

@maffoo maffoo commented Mar 23, 2023

Copy link
Copy Markdown

I get recursion errors when converting some large profiles with flameprof. This change avoids these RecursionErrors by using iteration with an explicit stack to compute block counts. Could get a similar effect using sys.setrecursionlimit with the existing recursive implementation, but there's no way to choose a sufficiently large limit, so a non-recursive implementation seems safer.

maffoo added 2 commits March 23, 2023 13:40
This avoids RecursionError when processing some profiles. Could get a
similar effect using `sys.setrecursionlimit` with the existing recursive
implementation, but there's no way to choose a sufficiently large limit,
so a non-recursive implementation seems safer.
@maffoo

maffoo commented Sep 23, 2024

Copy link
Copy Markdown
Author

Hi @baverman, I wanted to ask whether there's any chance to get this merged? I'd love to be able to continue using flameprof without having to patch it locally to increase the stack size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant